﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using Timer = System.Threading.Timer;

namespace HotCopperUserScanService
{
    public partial class UserScanService : ServiceBase
    {
        private readonly PostsTimer _postsTimer;

        public UserScanService()
        {
            InitializeComponent();
            _postsTimer = new PostsTimer(new HotCopperBrowser());
        }

        protected override void OnStart(string[] args)
        {
            _postsTimer.Start();
        }

        protected override void OnStop()
        {
            _postsTimer.Stop();
        }
    }
}
